We worked on Google Colab while doing the project.

When we open the .ipynb file as Jupyter Notebook, some plots look smaller than they are there.

In order to see the plots more easily, you can click on them twice and zoom in.

Introduction

In today’s world, stock prices are one of the most crucial parts of a company's finances. The movement of stock prices is influenced by various factors, both internal and external. In this project, some companies will be selected and their stock prices will be analyzed in a span of two years. The analysis encapsulates the changes in stock prices, the reasons of changes and the observation of outliers. The methods used are time series analysis, box plot, 3-Sigma technique. Time series analysis is used for visualizing data and observing the changes in stock prices. Box plot and 3-Sigma technique are used for identifying outliers.

Importing necessary libraries and dataset

Preprocessing of data

Boxplots

This code was developed by ChatGPT after much trials. It cannot be shared here because there is no specific prompt.

1.5 IQR Method

3-sigma Method

Scatter plots after detecting outliers

The following code was developed by chatgpt, but the process of obtaining the code is very long and painful, so it cannot be added here as a single prompt. It took almost 15 tries to get this code.

Insights taken from the outliers

Garanti vs Yapı Kredi

Time series plots and Outliers dataframe plots

Since both Garanti and Yapı Kredi are banking companies, the distribution of their data is similar on the selected interval. So, outlier analysis are constructed based on this similarity.

Characteristics of the data with log return

Codes below are generated by ChatGPT.

ChatGPT Prompt: I believe you understand my objective and characteristics of my time series. I need you to write a code to construct a new df based on resample data daily and log[(Y_t+1)/Y_t] (log return).

Correlation Matrix and Volatility

ChatGPT Prompt: Write a python code to show the correlation matrix and volatility. Explain them in detail. Give general informations about them.

Correlation Analysis:

Volatility Analysis:

ChatGPT Prompt: how to fill nan values by the mean of the previous 2 and next 2 data points?

Value at Risk Calculations

ChatGPT Prompt: Write a code for Value at Risk calculations and explain in detail what is VaR? Give general informations about VaR.

REFERENCES

Complex codes are taken from ChatGPT (GPT-3.5 turbo). Since one of our group members (Burak) works as a Data Scientist, some of the codes are taken from the previous studies/projects. We don't want to use ChatGPT for all of the work, documentations of the libraries helped a lot.

https://chat.openai.com/?model=text-davinci-002-render-sha https://pandas.pydata.org/docs/ https://matplotlib.org/stable/index.html https://www.statsmodels.org/stable/index.html https://www.yapikredi.com.tr/yapi-kredi-hakkinda/piyasa-bulteni/ https://www.garantibbvayatirim.com.tr/arastirma-raporlari/g%C3%BCnl%C3%BCk-b%C3%BCltenler